/**
 * Created by wxb on 2016/10/20.
 */
(function () {
  'use strict';

  angular.module('BlurAdmin')
    .service('alertService', function ($uibModal) {
      this.error = function (message) {
        $uibModal.open({
          animation: true,
          templateUrl: 'app/theme/components/alertMessage/dangerModal.html',
          controller: 'AlertMessageModalCtrl',
          resolve: {
            message: function () {
              return message
            }
          }
        });
      };
      this.success = function (message) {
        $uibModal.open({
          animation: true,
          templateUrl: 'app/theme/components/alertMessage/successModal.html',
          controller: 'AlertMessageModalCtrl',
          resolve: {
            message: function () {
              return message
            }
          }
        });
      };
      this.info = function (message) {
        $uibModal.open({
          animation: true,
          templateUrl: 'app/theme/components/alertMessage/infoModal.html',
          controller: 'AlertMessageModalCtrl',
          resolve: {
            message: function () {
              return message
            }
          }
        });
      };
      this.warning = function (message) {
        $uibModal.open({
          animation: true,
          templateUrl: 'app/theme/components/alertMessage/warningModal.html',
          controller: 'AlertMessageModalCtrl',
          resolve: {
            message: function () {
              return message
            }
          }
        });
      };
    })
    
  ;



})();